//
//  ITRefreshGifHeader.m
//  InTubePro
//
//  Created by seven on 2020/1/11.
//  Copyright © 2020 seven. All rights reserved.
//

#import "ITRefreshGifHeader.h"
#import "ITMJRefreshHeadGifImagesTool.h"
#import "ITAudioTool.h"
@implementation ITRefreshGifHeader

- (instancetype)init{
    self = [super init];
    if (self) {
        [self.lastUpdatedTimeLabel setHidden:YES];
        self.stateLabel.textColor = ColorWithHexAplha(0xffffff, 0.5);
        [self.stateLabel setHidden:YES];
        
        [self setImages:[ITMJRefreshHeadGifImagesTool imagesWithMJRefreshStateIdle] forState:MJRefreshStateIdle];
        [self setImages:[ITMJRefreshHeadGifImagesTool imagesWithMJRefreshStatePulling] forState:MJRefreshStatePulling];
        [self setImages:[ITMJRefreshHeadGifImagesTool imagesWithMJRefreshStateRefreshing] forState:MJRefreshStateRefreshing];
        [ITMJRefreshHeadGifImagesTool headerTitleWithMJRefreshStates:self];
        
    }
    return self;
}

- (void)setState:(MJRefreshState)state{
    [super setState:state];
    if (state == MJRefreshStatePulling) {
        [ITAudioTool impactFeedback];
    }
}

@end
